#ifndef __SCI_H
#define __SCI_H

#include "OS_CPU.H"
#include "Cpu.H"
#include "FT32F10x.h"
#include "Macro.h"

#define 	MAX_COMMAND_LENGTH	60
#define 	cUserBufSize	    75
#define     cAlarmCodeNum       20
#define     cSciNumMax       	4
#define     Null       0
#define     cGenComLength   5



enum FrameSts
{
	cFramehead = 0,		// 帧头
	cFrameVersion,		// 帧版本
	cFrameLength,		// 帧长度
	cFrameData,			// 帧数据
	cFrameCrc
};


extern INT8U ubUserDataBuf[cSciNumMax][cUserBufSize];				
extern INT8U ubCommandBuffer[cSciNumMax][MAX_COMMAND_LENGTH];
extern INT8U *pbCommandIn[cSciNumMax];
extern INT8U ubCommandLength[cSciNumMax];
extern INT8U ubTransferData[cSciNumMax][MAX_COMMAND_LENGTH];
extern INT8U ubTransferLength[cSciNumMax];


extern INT8U ubSciRcvSts[cSciNumMax];							// 当前帧处理状态
extern INT8U uwFrameBrkCnt[cSciNumMax];							// 帧中断计时器
extern INT8U uwFrameLenth[cSciNumMax];							// 帧数据长度
extern INT8U ubFrameVerion[cSciNumMax];							// 帧版本


extern INT8U sGetAllSendStsIdle(void);





#endif
